package com.zhuiyun.project.api.physician.mapper;


import com.zhuiyun.project.api.physician.entity.DoctorAudit;
import com.zhuiyun.project.common.mapper.BaseMapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @ClassName DoctorAuditMapper
 * @Description TODO
 * @Author kdj
 * @Date 2023/8/4 14:35
 **/
@Mapper
public interface DoctorAuditMapper extends BaseMapper<DoctorAudit> {
    /**
     * @param doctorId
     * @param auditor
     * @Author kdj
     * @Description 审核成为医师
     * @Date 2023/8/5 22:07
     * @Return int
     */
    @Update("UPDATE doctor_audit set audit_status = 1 , update_time=now() , audit_time=now() , auditor=#{auditor}  where doctor_id = #{doctorId} ")
    int userToPhy(Integer doctorId, String auditor);

    /**
     * @param doctorId
     * @param auditor
     * @Author kdj
     * @Description 审核成为医师
     * @Date 2023/8/5 22:07
     * @Return int
     */
    @Update("UPDATE doctor_audit set audit_status = 2 , update_time=now() , audit_time=now() , auditor=#{auditor},audit_comment=#{auditComment} where doctor_id = #{doctorId}")
    int userToPhyNo(Integer doctorId, String auditor, String auditComment);
}
